language: rust

rust:
  - nightly

os:
  - linux
  - osx

before_script:
  - rustup component add rustfmt
  - rustup component add rust-src
  - rustup component add llvm-tools-preview
  - (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
  - (test -x $HOME/.cargo/bin/cargo-xbuild || cargo install cargo-xbuild)
  - (test -x $HOME/.cargo/bin/bootimage || cargo install bootimage)
  - cargo install-update -a

script:
  - cargo test
  - bootimage build
  - cargo fmt -- --check

cache: cargo
